package com.dragon.aipictures.util;

import com.dragon.aipictures.Exception.BusinessException;
import com.dragon.aipictures.Exception.StateCode;

public class ThrowUtil {

    public static void throwIf(boolean state, StateCode code, String Message) {
        if (state) {
            throw new BusinessException(code,Message);
        }
    }
    public static void throwIf(boolean state, StateCode code) {
        throwIf(state,code,code.getMessage());
    }
}
